﻿/*
 * Created by SharpDevelop.
 * User: Chad Weimer
 * Date: 10/21/2011
 * Time: 9:04 AM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections.Generic;
using System.Linq;
using Tasx.Definitions;
using GTaskList = Google.Apis.Tasks.v1.Data.TaskList;
using GTasks = Google.Apis.Tasks.v1.Data.Tasks;

namespace Tasx.Providers.GoogleTasks
{
	public class GoogleTaskList : TaskList
	{
		internal GoogleTaskList(GoogleTaskProvider provider, GTaskList googleList, IEnumerable<GoogleTask> tasks)
			: base(provider)
		{
			//provider.VerifyNotNull("provider");
			//googleList.VerifyNotNull("googleList");
			//tasks.VerifyNotNull("tasks");
			
			Internal = googleList;
			_tasks = tasks;
		}
		
		private IEnumerable<ITask> _tasks = null;
		public override IEnumerable<ITask> Tasks
		{
			get { return _tasks; }
		}
		
		public override string Name
		{
			get { return Internal.Title; }
			set { Internal.Title = value; }
		}
		
		public override string Description
		{
			get { return null; }
			set { ; }
		}

		internal GTaskList Internal { get; private set; }
	}
}
